package com.share.simpleFactory.cashier;

public class Run {
    /**
     *
     * @param args
     */
    public static void main(String[] args) {
        int discountType = 2;//打折类型
        double price = 1000d;//单价
        int num = 10;//数量
        double totalPrices;//总价
        double total = 0d;//总价
        CashSuper csuper = CashFactory.createCashAccept(discountType);
        totalPrices = csuper.acceptCash(price, num);
        total  = totalPrices + total;
        System.out.println("total:"+total);
    }
}
